package feri.rest;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import feri.rest.RestClient.RequestMethod;



import android.R.integer;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class RESTtestActivity extends Activity {
    /** Called when the activity is first created. */
	/*	   @Override
   public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(   R.layout.main);
        final JsonParser jps = new JsonParser();
        
       Button ws = (Button) findViewById(R.id.button1);
        
                ws.setOnClickListener(new OnClickListener() {
        
         
        
                    public void onClick(View v) {
        // ip 164.8.218.3
                    	String url="http://164.8.218.3:8080/RestStoritve/resources/rest.kategorija/sync/2010-10-10 13:13:12";
                    	
                    	
                    	// kategorija
                    	
                    	RestClient clientKategorija = new RestClient(url);
                    	clientKategorija.AddHeader("Accept", "application/json");
                    	try {
                    	    clientKategorija.Execute(RequestMethod.GET);
                    	} catch (Exception e) {
                    	    e.printStackTrace();
                    	}
                    	 
                    	String responseKategorija = clientKategorija.getResponse();
                    	jps.parsajlokacija(responseKategorija);
                    	
                    	
                    	// dogodek
                    	url="http://164.8.218.3:8080/RestStoritve/resources/rest.dogodek/sync/"+"2010-10-10%2013:13:12";
                    	RestClient clientDogodek = new RestClient(url);
                    	clientDogodek.AddHeader("Accept", "application/json");
                    	try {
                    	    clientDogodek.Execute(RequestMethod.GET);
                    	} catch (Exception e) {
                    	    e.printStackTrace();
                    	}
                    	 
                    	String responseDogodek = clientDogodek.getResponse();
                    	jps.parsajDogodek(responseDogodek);
                    	
                    	// lokacija
                    	url="http://164.8.218.3:8080/RestStoritve/resources/rest.lokacija/sync/2010-10-10%2013:13:12";
                    	RestClient clientLokacija = new RestClient(url);
                    	clientLokacija.AddHeader("Accept", "application/json");
                    	try {
                    	    clientLokacija.Execute(RequestMethod.GET);
                    	} catch (Exception e) {
                    	    e.printStackTrace();
                    	}
                    	 
                    	String responseLokacija = clientLokacija.getResponse();
                    	jps.parsajlokacija(responseLokacija);
                    	
                    	
                    	
                    	
        
                    }
        
                });

    }  */
    
	

}
